﻿@ModelType IEnumerable(Of SiiabCamarasMovil.Camaras)
    
<table width="100%" height="100%" border="0" bgcolor="#DEE6F3">
    @If Model.Count = 1 Then
        @<tr>
                <td width="100%">
                <div> 
                <div class="alignCenter boldLink">
                 @If Not Model(0) Is Nothing Then
                    @Model(0).Nombre_Camara 
                 End If
                </div>
                    @If Not Model(0) Is Nothing Then
                    @<img  width="100%" height="100%" id="@Model(0).id_Camara"src="@Model(0).Ip_Camara?@Math.Abs(DateTime.Now.ToBinary)"/> 
                    End If
                </div>
                </td>
        </tr> 
    ElseIf Model.Count = 2 Then
        Dim intContador As Integer = 0
        
        For i As Integer = 1 To 1 Step 1
        @<tr>
        
            @For j As Integer = 1 To 2 Step 1
                @<td width="50%">
                <div> 
                <div class="alignCenter boldLink">
                 @If Not Model(intContador) Is Nothing Then
                    @Model(intContador).Nombre_Camara 
                 End If
                </div>
                    @If Not Model(intContador) Is Nothing Then
                    @<img  width="100%" height="50%" id="@Model(intContador).id_Camara"src="@Model(intContador).Ip_Camara?@Math.Abs(DateTime.Now.ToBinary)"/> 
                     intContador += 1
                    End If
                </div>
                </td>
            Next
        </tr> 
        Next
        
    Else
        Dim intContador As Integer = 0
        For i As Integer = 1 To 2 Step 1
        @<tr>
            @For j As Integer = 1 To 2 Step 1
                @<td width="50%">
                    <div> 
                      <div class="alignCenter boldLink">
                  @If Not Model(intContador) Is Nothing Then
                    @Model(intContador).Nombre_Camara 
                 End If
                </div>
                    @If Not Model(intContador) Is Nothing Then
                          @<img width="100%" height="50%" id="@Model(intContador).id_Camara" src="@Model(intContador).Ip_Camara?@Math.Abs(DateTime.Now.ToBinary)"/> 
                    intContador += 1
                    End If
                    </div>
                </td>
            Next
        </tr> 
        Next
    End If
</table>
